/*******************************************************************************************
 *  Bullet.h
 *
 *  Creating and managing Bullet object structures.
 *
 *******************************************************************************************/







/*******************************************************************************************
 *  INCLUDES :
 *******************************************************************************************/
#include "BulletMLConsts.h"
#include "BulletMLTypes.h"
#include "Direction.h"
#include "Speed.h"
#include "Action.h"
#include "ActionRef.h"







/*******************************************************************************************
 *  TYPE definitions :
 *******************************************************************************************/

/* The BULLET object strucuture definition : */
#ifndef _BULLET_STRUCT_
#define _BULLET_STRUCT_
typedef struct {

	ObjType		otype;								/* The object's type, as in ...    */
													/* ... the BML type enum.          */

	char		*label;								/* The bullet object's label.      */

	Direction	*direction;							/* The bullet object's direction.  */
	Speed		*speed;								/* The bullet object's speed.      */

	int			actionsNum;							/* How many actions?               */
	int			actionRefsNum;						/* How many referenced actions ? */
	Action		*actions[MAX_BULLET_ACTIONS];		/* The bullet object's action's... */
	ActionRef	*actionRefs[MAX_BULLET_ACTIONS];	/* ... ActionRefs are possible to. */

} Bullet;
#endif







/*******************************************************************************************
 *  Function PROTOTYPES :
 *******************************************************************************************/

/* CONSTRUCTOR and DESTRUCTOR : */
Bullet 	*newBullet(void);				/* Creates an empty Bullet object strucutre. */
void 	freeBullet(Bullet *b);			/* Destroys a Bullet object structure.       */ 


/* FILLING the Bullet object structure : */
void 	setBulletLabel(Bullet *b, char *l);
void 	setBulletDirection(Bullet *b, Direction *d);
void 	setBulletSpeed(Bullet *b, Speed *s);
void 	addBulletAction(Bullet *b, Action *a);
void 	addBulletActionRef(Bullet *b, ActionRef *ar);
